#!/usr/bin/env bash

echo -e "\033[34m--------------------wsgi process------------------------]\033"
ps -ef|grep bike_sys.ini | grep -v grep

sleep 0.5

echo -e '\n-------------------------going to close----------------------------'

ps -ef|grep bike_sys.ini | grep -v grep | awk '{print $2}' | xargs kill -9

sleep 0.5


echo -e '\-------------------------check if the kill action is correct----------------------------'

/home/pyProject/bicke_sys/.venv/bin/uwsgi --ini bike_sys.ini & >/dev/null


echo -e "\n\033[42;1m--------------------stared....------------------------]\033[0m"
sleep 1

ps -ef | grep bike_sys.ini | grep -v grep
